<taglib name="html" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE>{$Think.lang.reg_title}</TITLE>
<link rel='stylesheet' type='text/css' href='__PUBLIC__/Css/common.css'>
<!--
-->
<html:import type="js" file="Js.Base" /> 
<html:import type="js" file="Js.prototype" /> 
<html:import type="js" file="Js.mootools" /> 
<html:import type="js" file="Js.Ajax.ThinkAjax" /> 
<html:import type="js" file="Js.Form.CheckForm" /> 

<!--
<html:import type="js" file="Js.jquery" />
-->

</HEAD>
 <BODY>
 
<SCRIPT LANGUAGE="JavaScript">

function add(){
	ThinkAjax.sendForm('form1','__URL__/insert',complete,'result');
}

function complete(data,status){
	if (status==1){
		$('result').innerHTML = '注册成功!';
	}
}

function checkUser(){
	ThinkAjax.send('__URL__/checkUser','ajax=1&username='+$('username').value,'','result');
}

function ckusername()
{
alert($F('username'));

	var username = $.trim($('#username').val());
/*
$.ajax({
 type: "GET",
 url: "__URL__/checkUser",
 data:   "ajax=1&username="+username,
 success: function(msg){ alert(msg); } 
});
*/
}

function showadv(obj){
	$('#'+obj).slideToggle("slow"); 
}

</SCRIPT>
 <div class="main">
 <H2>{$Think.lang.reg_title}</H2>

<FORM id="form1" METHOD=POST ACTION="__URL__/insert">
 <TABLE cellpadding=2 cellspacing=2>
  <TR>
	<TD colspan="2"><div id="result" name="result" class="none result" style="font-family:微软雅黑,Tahoma;letter-spacing:2px"></div></TD>
 </TR>
<TBODY>
 <TR>
	<TD class="tRight" width="12%">{$Think.lang.reg_username}</TD>
	<TD class="tLeft" >
	<INPUT TYPE="text" NAME="username" id="username" style="height:23px" class="large bLeft">
	<INPUT TYPE="button" value="检 查" class="small button" onclick="checkUser()">
	<INPUT TYPE="button" value="ckusername" class="small button" onclick="ckusername()">
	</TD>
 </TR>
 <TR>
	<TD class="tRight" >{$Think.lang.reg_userpass}</TD>
	<TD class="tLeft" ><INPUT TYPE="password" NAME="password" style="height:23px" class="huge bLeft"></TD>
 </TR>
 <TR>
	<TD class="tRight" >{$Think.lang.reg_userpass2}</TD>
	<TD class="tLeft" ><INPUT TYPE="password" NAME="password2" style="height:23px" class="huge bLeft"></TD>
 </TR>
  <TR>
	<TD class="tRight" >{$Think.lang.reg_useremail}</TD>
	<TD class="tLeft" ><INPUT TYPE="text" NAME="email" style="height:23px" class="huge bLeft"></TD>
 </TR>
  <TR>
	<TD class="tRight" >高级选项</TD>
	<TD class="tLeft" ><INPUT onclick=showadv('adv') type=checkbox value=1 name=advshow> 显示高级用户设置选项</TD>
 </TR>
</TBODY>
</table>
<div id="adv" style="DISPLAY: none">
 <TABLE>
  <TR>
	<TD class="tRight" >安全提问</TD>
	<TD class="tLeft" ><INPUT TYPE="text" NAME="question" style="height:23px" class="huge bLeft"></TD>
 </TR>
  <TR>
	<TD class="tRight" >回答</TD>
	<TD class="tLeft" ><INPUT TYPE="text" NAME="answer" style="height:23px" class="huge bLeft"></TD>
 </TR>
  <TR>
	<TD class="tRight" >性别</TD>
	<TD class="tLeft" ><INPUT TYPE="text" NAME="gender" style="height:23px" class="huge bLeft"></TD>
 </TR>
  <TR>
	<TD class="tRight" >生日</TD>
	<TD class="tLeft" ><INPUT TYPE="bday" NAME="gender" style="height:23px" class="huge bLeft"></TD>
 </TR>
  </TABLE>
</div>
<div>
<TABLE>
 <TR>
	<TD class="tRight tTop" >{$Think.lang.reg_verifycode}</TD>
	<TD><INPUT TYPE="text" NAME="verify" style="height:23px;" class="small" > <img src="__URL__/verify" align="absmiddle" onclick="this.src='__URL__/verify'" style="cursor:hand;" /></TD>
 </TR>
 <TR>
	<TD><INPUT TYPE="hidden" NAME="ajax" value="1"></TD>
	<TD><INPUT TYPE="button" onclick="add()" class="button" value="{$Think.lang.form_submit}"> <INPUT TYPE="reset" class="button" value="{$Think.lang.form_reset}"></TD>
 </TR>
  <TR>
  <TD></TD>
	<TD > <div id="list" >
	<volist name="list" id="vo">
	<div class="result" style='font-weight:normal;<eq name="odd" value="1">background:#ECECFF</eq>'>
	<div style="border-bottom:1px dotted silver">{$vo.username}  [{$vo.password} {$vo.regtime|date='Y-m-d H:i:s',###}]</div>
	</div>
	</volist></div></TD>
  </TR>
 <TR>
 <TD></TD>
	<TD ><HR></TD>
 </TR>
 </TABLE>
  </div>
   </FORM>
</div>
<table width="800" border=1>
      <DIV style="border:1px solid red;">
		  <DIV onclick="showadv('leftmenuitem_0');">用户信息</DIV>
		  <DIV id=leftmenuitem_0>
			  <LI>用户名：admin 
			  <LI>用户组：系统管理员 
			  <LI>登录IP：127.0.0.1 </LI>
		  </DIV>
	  </DIV>
</table>

 </BODY>
</HTML>
